<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
    <script>
    //定义原始类型的变量
    var name = "why"//字符串是原始类型
    var age = 18
    
    //定义对象类型的变量
    //地址 - 指针 - 引用
    var obj = {}  //堆内存
    var foo = function() {} //堆内存
    function bar() {} //堆内存

      //Function extends Object
    console.log(typeof obj)
    console.log(typeof foo)  // function -> object
    var p = new Person()
    var stu = new Student()   //stu是一个Student  ->Person

    //引申一些别的知识
    var info = {}
    function sayJello() {//这个也是一个对象

    }
    sayHello.age=18;
    console.log(sayHello.age)
    function Dog() {

    }
    //构造函数上（类上面）添加的函数，称之为类方法
   Dog.running = funciton(); {}
   Dog.running()
    </script>
</body>
</html>